package com.icangya.DAO.impl;

import com.icangya.DAO.ICustomerImageDAO;
import com.icangya.domain.AgentImage;
import com.icangya.domain.CustomerImage;
import com.icangya.domain.SystemSetting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public class CustomerImageDAOImpl extends  BaseDAO<CustomerImage> implements ICustomerImageDAO {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public CustomerImage getCustomerImage() {
        String hql="FROM CustomerImage ci order by  ci.create_time desc";
        List<CustomerImage> list= (List<CustomerImage>) getHibernateTemplate().find(hql);
        if(list.size()>0)
            return list.get(0);
        return null;
    }

}
